<%--
  Created by IntelliJ IDEA.
  User: 22328
  Date: 2021/2/6
  Time: 16:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>用户信息查看</title>
    <link href="./lib/layui/css/layui.css" type="text/css" rel="stylesheet">
    <script src="./lib/layui/layui.js" type="text/javascript"></script>
</head>
<body>
<h2 style="margin-top: 10px;margin-left: 17px">个人信息：</h2>
<form class="layui-form" action="#" style="text-align: center">
    <div class="layui-form-item">
        <label class="layui-form-label" style="width: 200px">用户状态</label>
        <div class="layui-input-inline">
            <select id="status" name="status">
                <c:if test="${userInfo.status == 1}">
                    <option value="1">启用</option>
                    <option value="0">禁用</option>
                </c:if>
                <c:if test="${userInfo.status == 0}">
                    <option value="0">禁用</option>
                    <option value="1">启用</option>
                </c:if>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" style="width: 200px">用户名</label>
        <div class="layui-input-inline">
            <input type="text" name="username" required lay-verify="required" value="${requestScope.userInfo.userName}"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" style="width: 200px">密码</label>
        <div class="layui-input-inline">
            <input type="text" name="password" required lay-verify="required" value="${requestScope.userInfo.passWord}"
                   autocomplete="off" class="layui-input">
        </div>
        <%--<div class="layui-form-mid layui-word-aux">辅助文字</div>--%>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" style="width: 200px">性别</label>
        <div class="layui-input-inline">
            <input type="text" name="sex" required lay-verify="required" value="${requestScope.userInfo.sex}"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" style="width: 200px">年龄</label>
        <div class="layui-input-inline">
            <input type="text" name="age" required lay-verify="required" value="${requestScope.userInfo.age}"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" style="width: 200px">电话</label>
        <div class="layui-input-inline">
            <input type="text" name="phone" required lay-verify="required" value="${requestScope.userInfo.phone}"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" style="width: 200px">邮箱</label>
        <div class="layui-input-inline">
            <input type="text" name="email" required lay-verify="required" value="${requestScope.userInfo.email}"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" style="width: 200px">最近登录时间</label>
        <div class="layui-input-inline">
            <input type="text" name="lastTime" required lay-verify="required" value="${requestScope.userInfo.lastTime}"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label" style="width: 200px">登录IP</label>
        <div class="layui-input-inline">
            <input type="text" name="loginIp" required lay-verify="required" value="${requestScope.userInfo.loginIp}"
                   autocomplete="off" class="layui-input">
        </div>
    </div>
</form>

<script>
    //Demo
    layui.use('form', function () {
        var form = layui.form;
        //监听提交
        form.on('submit(formDemo)', function (data) {
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>
</body>
</html>
